/*
 Copyright To change this template, choose Tools | Templates
 Copyright and open the template in the editor.
 */

package com.click.app.dao.hibernate;

import com.click.app.dao.LaundryRequestItemDao;
import com.click.app.model.LaundryRequestItem;

import java.util.List;

/**
 * @author Joel Chuca Condo
 * @date 17/06/2009
 */
public class LaundryRequestItemDaoHibernate extends GenericDaoHibernate<LaundryRequestItem, Long> implements LaundryRequestItemDao{

    public LaundryRequestItemDaoHibernate(){
        super(LaundryRequestItem.class);
    }
    
    public List<LaundryRequestItem> getOrderByLaundryType(Long idLaundryRequest){
        return getHibernateTemplate().find("from LaundryRequestItem as lri where lri.idLaundryRequest=? "+
                " order by lri.laundryType.name", idLaundryRequest);
    }
}
